import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'
const userInfo = 'userInfo'
const menuData = 'set_menu'

export function getToken() {
  return Cookies.get(TokenKey)
}
export function getInfo() {
  return Cookies.get(userInfo)
}

export function getMenu() {
  return Cookies.get(menuData)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function setInfo(token) {
  return Cookies.set(userInfo, token)
}

export function setMenu(token) {
  return Cookies.set(menuData, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
export function removeInfo() {
  return Cookies.remove(userInfo)
}
export function removeMenu() {
  return Cookies.remove(menuData)
}
